﻿using System;
using com.yoozoo.gta.Extension.UGUI.ScreenOrientationEx;
using UnityEngine;

namespace com.yoozoo.gta.Extension.UGUI.ScreenOrientation.Adapter
{
    [Serializable]
    public class NestedScrollRectShieldConfig
    {
        public bool thisIsUpAndDown = true;
        
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            NestedScrollRectShieldConfig other = obj as NestedScrollRectShieldConfig;
            if (thisIsUpAndDown != other.thisIsUpAndDown)
            {
                return false;
            }

            return true;
        }
        
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
    [DisallowMultipleComponent]
    public class NestedScrollRectShieldAdapt : AdaptBase<NestedScrollRectShieldConfig, NestedScrollRectShield>
    {
        protected override void CopyProperty(NestedScrollRectShieldConfig config)
        {
            config.thisIsUpAndDown = mComponent.thisIsUpAndDown;
        }
 
        protected override void ApplyConfig(NestedScrollRectShieldConfig config)
        {
            mComponent.thisIsUpAndDown = config.thisIsUpAndDown;
        }
    }
}